package cn.sunjiachao.blog4jcs.modules.blog.service.imp;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.sunjiachao.blog4jcs.modules.blog.dao.BlogDao;
import cn.sunjiachao.blog4jcs.modules.blog.service.BlogService;
import cn.sunjiachao.blog4jcs_common.model.Blog;
import cn.sunjiachao.blog4jcs_common.util.web.Page;

@Service
public class BlogServiceImp implements BlogService {

	@Resource
	private BlogDao blogDao;

	@Override
	public Blog getById(Long id) {
		return blogDao.getById(id);
	}

	@Override
	public void save(Blog blog) {
		blogDao.save(blog);
	}

	@Override
	public Page<Blog> queryForPage(int currentPage, int pageSize) {
		return blogDao.queryForPage(currentPage, pageSize);
	}

}
